package com.mxpio.erp.common.order.policy;

import java.util.ArrayList;
import java.util.List;

import com.mxpio.erp.common.inventory.service.LotService;
import com.mxpio.erp.common.jpa.model.Notice;
import com.mxpio.erp.common.vo.OrderExcuteLineVo;

import lombok.Data;

/**
 * 业务配置
 *
 */
@Data
public class NoticeContext {

	public static NoticeContext init(Notice entity) {
		NoticeContext context = new NoticeContext();
		context.setEntity(entity);
		return context;
	}
	
	private Notice entity;
	
	private List<OrderExcuteLineVo> orderExcuteVos;
	
	private String accessType;
	
	private LotService lotService;
	
	private List<String> errors;
	
	public void addError(String error) {
		if(errors == null) {
			errors = new ArrayList<>();
		}
		errors.add(error);
	}
	
}